package com.umgsai.thread.thread66;

public class Main4 {
	public static void main(String[] args) {
		try {
			ThreadGroup group = new ThreadGroup("My-group");
			for (int i = 0; i < 5; i++) {
				MyThread thread = new MyThread(group, "Thread-" + i);
				thread.start();
			}
			Thread.sleep(5000);
			group.interrupt();
			System.out.println("调用了interrupt方法");
		} catch (Exception e) {
			System.out.println("停了");
			e.printStackTrace();
		}
	}
}
